﻿<html>
<head>
    <title>驰骋工作流</title>
    <meta charset="UTF-8" />
    <script language="JavaScript" src="../Comm/JScript.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../Scripts/QueryString.js" type="text/javascript"></script>
    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="../Scripts/config.js"></script>
    <script type="text/javascript" src="../Comm/Gener.js"></script>
    <script type="text/javascript" language="javascript">
        //页面启动函数.
        $(function () {

            $("#Msg").html("<img src=../Img/loading.gif />正在加载,请稍后......");

            var name, value;
            var str = location.href; //取得整个地址栏
            var num = str.indexOf("?");
            str = str.substr(num + 1); //取得所有参数   stringvar.substr(start [, length ]
            str = str.replace('DoType=Frm_Init', '');

            var url = Handler + "?DoType=Frm_Init&" + str + "&e1m=" + Math.random();

            url = url.replace('&DoType=MyFlow_Init', '');
            url = url.replace('&DoType=View', '');

            $.ajax({
                type: 'post',
                async: true,
                url: url,
                dataType: 'html',
                success: function (data) {
                    if (data.indexOf('err@') == 0) {
                        alert(data); //如果是异常，就提提示.
                        return;
                    }

                    if (data.indexOf('url@') == 0) {
                        data = data.replace('url@', ''); //如果返回url，就直接转向.
                        window.location.href = data;
                        return;
                    }

                    $("#Msg").html(data);
                    return;
                }
            });

        });
    </script>
</head>
<body>
    <form id="cc">
    <br />
    <br />
    <br />
    <center>
        <h3><img src='../Img/loading.gif' />正在加载，请稍后...</h3>
    </center>
    </form>
</body>
</html>
